<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.11.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>cppMISC: wheels::linuxSerial类 参考</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<script type="text/javascript" src="../../clipboard.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../cookie.js"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript" src="../../darkmode_toggle.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">cppMISC<span id="projectnumber">&#160;v1.1</span>
   </div>
   <div id="projectbrief">cppMisc 文档系统</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.11.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(1); });
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('../../',true,false,'search.php','搜索',false);
  $(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){ initResizable(false); });
/* @license-end */
</script>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">载入中...</div>
<div class="SRStatus" id="Searching">搜索中...</div>
<div class="SRStatus" id="NoMatches">未找到</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="../../df/d8d/namespacewheels.html">wheels</a></li><li class="navelem"><a class="el" href="../../de/d23/classwheels_1_1linux_serial.html">linuxSerial</a></li>  </ul>
</div>
</div><!-- top -->
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="#pro-methods">Protected 成员函数</a> &#124;
<a href="../../d2/d58/classwheels_1_1linux_serial-members.html">所有成员列表</a>  </div>
  <div class="headertitle"><div class="title">wheels::linuxSerial类 参考</div></div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="../../d2/dd8/linux_serial_8hpp_source.html">linuxSerial.hpp</a>&gt;</code></p>
<div class="dynheader">
类 wheels::linuxSerial 继承关系图:</div>
<div class="dyncontent">
<div class="center"><img src="../../df/dc6/classwheels_1_1linux_serial__inherit__graph.png" border="0" usemap="#awheels_1_1linux_serial_inherit__map" alt="Inheritance graph"/></div>
<map name="awheels_1_1linux_serial_inherit__map" id="awheels_1_1linux_serial_inherit__map">
<area shape="rect" title=" " alt="" coords="8,688,176,1424"/>
<area shape="rect" href="../../d2/da4/classwheels_1_1i_serial.html" title=" " alt="" coords="5,5,179,640"/>
<area shape="poly" title=" " alt="" coords="95,655,95,688,89,688,89,655"/>
</map>
</div>
<div class="dynheader">
wheels::linuxSerial 的协作图:</div>
<div class="dyncontent">
<div class="center"><img src="../../dd/d71/classwheels_1_1linux_serial__coll__graph.png" border="0" usemap="#awheels_1_1linux_serial_coll__map" alt="Collaboration graph"/></div>
<map name="awheels_1_1linux_serial_coll__map" id="awheels_1_1linux_serial_coll__map">
<area shape="rect" title=" " alt="" coords="8,688,176,1424"/>
<area shape="rect" href="../../d2/da4/classwheels_1_1i_serial.html" title=" " alt="" coords="5,5,179,640"/>
<area shape="poly" title=" " alt="" coords="95,655,95,688,89,688,89,655"/>
</map>
</div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a697fb4aa40e1b97ce273cdc56e3fdf3f" id="r_a697fb4aa40e1b97ce273cdc56e3fdf3f"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a697fb4aa40e1b97ce273cdc56e3fdf3f">linuxSerial</a> (const std::string &amp;name)</td></tr>
<tr class="memdesc:a697fb4aa40e1b97ce273cdc56e3fdf3f"><td class="mdescLeft">&#160;</td><td class="mdescRight">创建对象，设置窗口名称和接收到数据的时候回调响应  <br /></td></tr>
<tr class="separator:a697fb4aa40e1b97ce273cdc56e3fdf3f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a688f4db1d912419750eb067980190858" id="r_a688f4db1d912419750eb067980190858"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a688f4db1d912419750eb067980190858">linuxSerial</a> (const std::string &amp;name, int baud, int char_len, <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#a5e585bb076d6a01c8c9cdab92e20c5ac">stop</a> s, <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ab1661c3535b0ca7149121b8b00dddca0">parity</a> p, <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#a86e499ffc36867fed86449541837b295">flow</a> f)</td></tr>
<tr class="memdesc:a688f4db1d912419750eb067980190858"><td class="mdescLeft">&#160;</td><td class="mdescRight">创建并打开串口  <br /></td></tr>
<tr class="separator:a688f4db1d912419750eb067980190858"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaa6af0628c178e3e93f502c048a1dafb" id="r_aaa6af0628c178e3e93f502c048a1dafb"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aaa6af0628c178e3e93f502c048a1dafb">~linuxSerial</a> ()</td></tr>
<tr class="separator:aaa6af0628c178e3e93f502c048a1dafb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9094b478b3581e0b04a163650ad2835d" id="r_a9094b478b3581e0b04a163650ad2835d"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a9094b478b3581e0b04a163650ad2835d">nativeHandle</a> ()</td></tr>
<tr class="separator:a9094b478b3581e0b04a163650ad2835d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae1eda65d5555203a3c5efbdf7c025b57" id="r_ae1eda65d5555203a3c5efbdf7c025b57"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ac0046f5f91af625697c0474ae5084383">err_code</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ae1eda65d5555203a3c5efbdf7c025b57">open</a> (int baud, int char_len, <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#a5e585bb076d6a01c8c9cdab92e20c5ac">stop</a> s, <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ab1661c3535b0ca7149121b8b00dddca0">parity</a> p, <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#a86e499ffc36867fed86449541837b295">flow</a> f) final</td></tr>
<tr class="memdesc:ae1eda65d5555203a3c5efbdf7c025b57"><td class="mdescLeft">&#160;</td><td class="mdescRight">打开串口。  <br /></td></tr>
<tr class="separator:ae1eda65d5555203a3c5efbdf7c025b57"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae7aa105c917d919cda8239f2bc0b064c" id="r_ae7aa105c917d919cda8239f2bc0b064c"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ac0046f5f91af625697c0474ae5084383">err_code</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ae7aa105c917d919cda8239f2bc0b064c">close</a> () final</td></tr>
<tr class="separator:ae7aa105c917d919cda8239f2bc0b064c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae173022d0f2cec8917b6ef9ed6b3ed31" id="r_ae173022d0f2cec8917b6ef9ed6b3ed31"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ac0046f5f91af625697c0474ae5084383">err_code</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ae173022d0f2cec8917b6ef9ed6b3ed31">send</a> (size_t len, const char *data) final</td></tr>
<tr class="memdesc:ae173022d0f2cec8917b6ef9ed6b3ed31"><td class="mdescLeft">&#160;</td><td class="mdescRight">发送数据。这个函数调用后立即返回，操作结果从回调中获取，因此这个函数执行返回后 并不一位置发送完成  <br /></td></tr>
<tr class="separator:ae173022d0f2cec8917b6ef9ed6b3ed31"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae21be7510349d6d422b101cdc7c6f536" id="r_ae21be7510349d6d422b101cdc7c6f536"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html">iSerial</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ae21be7510349d6d422b101cdc7c6f536">evtOpen</a> (std::function&lt; void(<a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ac0046f5f91af625697c0474ae5084383">err_code</a>)&gt; fun) final</td></tr>
<tr class="memdesc:ae21be7510349d6d422b101cdc7c6f536"><td class="mdescLeft">&#160;</td><td class="mdescRight">操作事件设置操作事件  <br /></td></tr>
<tr class="separator:ae21be7510349d6d422b101cdc7c6f536"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaec1476e75dc8e7f9639bd4fa93ec34c" id="r_aaec1476e75dc8e7f9639bd4fa93ec34c"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html">iSerial</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aaec1476e75dc8e7f9639bd4fa93ec34c">evtClose</a> (std::function&lt; void(<a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ac0046f5f91af625697c0474ae5084383">err_code</a>)&gt; fun) final</td></tr>
<tr class="separator:aaec1476e75dc8e7f9639bd4fa93ec34c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2de566243fef6baac4e160366fa1cb6a" id="r_a2de566243fef6baac4e160366fa1cb6a"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html">iSerial</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a2de566243fef6baac4e160366fa1cb6a">evtSend</a> (std::function&lt; void(size_t, <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ac0046f5f91af625697c0474ae5084383">err_code</a>)&gt; fun) final</td></tr>
<tr class="separator:a2de566243fef6baac4e160366fa1cb6a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7ec905c105f06ff8fb4732e0780d3c36" id="r_a7ec905c105f06ff8fb4732e0780d3c36"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html">iSerial</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a7ec905c105f06ff8fb4732e0780d3c36">evtRecv</a> (std::function&lt; void(size_t, const char *, <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ac0046f5f91af625697c0474ae5084383">err_code</a>)&gt; fun) final</td></tr>
<tr class="separator:a7ec905c105f06ff8fb4732e0780d3c36"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a29a53363016957fd31b13ce4afc53215" id="r_a29a53363016957fd31b13ce4afc53215"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ac0046f5f91af625697c0474ae5084383">err_code</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a29a53363016957fd31b13ce4afc53215">reset</a> () final</td></tr>
<tr class="memdesc:a29a53363016957fd31b13ce4afc53215"><td class="mdescLeft">&#160;</td><td class="mdescRight">复位串口。关闭串口重新打开  <br /></td></tr>
<tr class="separator:a29a53363016957fd31b13ce4afc53215"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab7b40c9251d0968ad29e1c35bd2e2022" id="r_ab7b40c9251d0968ad29e1c35bd2e2022"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ac0046f5f91af625697c0474ae5084383">err_code</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ab7b40c9251d0968ad29e1c35bd2e2022">reset</a> (int baud, int char_len, <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#a5e585bb076d6a01c8c9cdab92e20c5ac">stop</a> s, <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ab1661c3535b0ca7149121b8b00dddca0">parity</a> p, <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#a86e499ffc36867fed86449541837b295">flow</a> f) final</td></tr>
<tr class="separator:ab7b40c9251d0968ad29e1c35bd2e2022"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a41192c3d698e15dbd0e9c11427969774" id="r_a41192c3d698e15dbd0e9c11427969774"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a41192c3d698e15dbd0e9c11427969774">is_open</a> () final</td></tr>
<tr class="memdesc:a41192c3d698e15dbd0e9c11427969774"><td class="mdescLeft">&#160;</td><td class="mdescRight">串口是否打开  <br /></td></tr>
<tr class="separator:a41192c3d698e15dbd0e9c11427969774"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a474d5ad2e7bb59dc4a6ed1d46a80d056" id="r_a474d5ad2e7bb59dc4a6ed1d46a80d056"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a474d5ad2e7bb59dc4a6ed1d46a80d056">run</a> (bool run) final</td></tr>
<tr class="memdesc:a474d5ad2e7bb59dc4a6ed1d46a80d056"><td class="mdescLeft">&#160;</td><td class="mdescRight">启动串口循环  <br /></td></tr>
<tr class="separator:a474d5ad2e7bb59dc4a6ed1d46a80d056"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9394e61eb3763eb72c902a2fef68ddb2" id="r_a9394e61eb3763eb72c902a2fef68ddb2"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a9394e61eb3763eb72c902a2fef68ddb2">standby</a> () final</td></tr>
<tr class="memdesc:a9394e61eb3763eb72c902a2fef68ddb2"><td class="mdescLeft">&#160;</td><td class="mdescRight">结束串口消息循环  <br /></td></tr>
<tr class="separator:a9394e61eb3763eb72c902a2fef68ddb2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae409a2a29670472702e795ffb5048a5a" id="r_ae409a2a29670472702e795ffb5048a5a"><td class="memItemLeft" align="right" valign="top">virtual native_handle_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ae409a2a29670472702e795ffb5048a5a">native_handle</a> () final</td></tr>
<tr class="memdesc:ae409a2a29670472702e795ffb5048a5a"><td class="mdescLeft">&#160;</td><td class="mdescRight">读取系统  <br /></td></tr>
<tr class="separator:ae409a2a29670472702e795ffb5048a5a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a916cf4b6b9e105f9272ea0d7abbe4cef" id="r_a916cf4b6b9e105f9272ea0d7abbe4cef"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a916cf4b6b9e105f9272ea0d7abbe4cef">OnOpen</a> (int fd)</td></tr>
<tr class="memdesc:a916cf4b6b9e105f9272ea0d7abbe4cef"><td class="mdescLeft">&#160;</td><td class="mdescRight">响应libuv 打开文件操作  <br /></td></tr>
<tr class="separator:a916cf4b6b9e105f9272ea0d7abbe4cef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a27cf617098740187e21ce1c169a7e3e6" id="r_a27cf617098740187e21ce1c169a7e3e6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a27cf617098740187e21ce1c169a7e3e6">OnRecv</a> (const char *dat, size_t len)</td></tr>
<tr class="memdesc:a27cf617098740187e21ce1c169a7e3e6"><td class="mdescLeft">&#160;</td><td class="mdescRight">响应读取数据完成  <br /></td></tr>
<tr class="separator:a27cf617098740187e21ce1c169a7e3e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6bb972a9a97bcab75f14753d425f8ebe" id="r_a6bb972a9a97bcab75f14753d425f8ebe"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a6bb972a9a97bcab75f14753d425f8ebe">OnSend</a> (size_t len, <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ac0046f5f91af625697c0474ae5084383">err_code</a> e)</td></tr>
<tr class="memdesc:a6bb972a9a97bcab75f14753d425f8ebe"><td class="mdescLeft">&#160;</td><td class="mdescRight">响应写数据完成  <br /></td></tr>
<tr class="separator:a6bb972a9a97bcab75f14753d425f8ebe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa1a7af1da37554706069e1f83e48d50d" id="r_aa1a7af1da37554706069e1f83e48d50d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aa1a7af1da37554706069e1f83e48d50d">OnClose</a> (<a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ac0046f5f91af625697c0474ae5084383">err_code</a> e)</td></tr>
<tr class="memdesc:aa1a7af1da37554706069e1f83e48d50d"><td class="mdescLeft">&#160;</td><td class="mdescRight">响应串口关闭  <br /></td></tr>
<tr class="separator:aa1a7af1da37554706069e1f83e48d50d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a499b01dd1f4f06f675fc3466dd7a0e39" id="r_a499b01dd1f4f06f675fc3466dd7a0e39"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a499b01dd1f4f06f675fc3466dd7a0e39">SetBufferSize</a> (size_t l)</td></tr>
<tr class="memdesc:a499b01dd1f4f06f675fc3466dd7a0e39"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置缓冲大小  <br /></td></tr>
<tr class="separator:a499b01dd1f4f06f675fc3466dd7a0e39"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classwheels_1_1i_serial"><td colspan="2" onclick="javascript:dynsection.toggleInherit('pub_methods_classwheels_1_1i_serial')"><img src="../../closed.png" alt="-"/>&#160;Public 成员函数 继承自 <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html">wheels::iSerial</a></td></tr>
<tr class="memitem:ab8aca3b048eddae137fe5a329ce0da91 inherit pub_methods_classwheels_1_1i_serial" id="r_ab8aca3b048eddae137fe5a329ce0da91"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d2/da4/classwheels_1_1i_serial.html">iSerial</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ab8aca3b048eddae137fe5a329ce0da91">evtClose</a> (std::function&lt; void(<a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ac0046f5f91af625697c0474ae5084383">err_code</a>)&gt; fun)</td></tr>
<tr class="separator:ab8aca3b048eddae137fe5a329ce0da91 inherit pub_methods_classwheels_1_1i_serial"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7e98cc0bbb63d96c8033188ebefeb94e inherit pub_methods_classwheels_1_1i_serial" id="r_a7e98cc0bbb63d96c8033188ebefeb94e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d2/da4/classwheels_1_1i_serial.html">iSerial</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#a7e98cc0bbb63d96c8033188ebefeb94e">evtSend</a> (std::function&lt; void(size_t, <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ac0046f5f91af625697c0474ae5084383">err_code</a>)&gt; fun)</td></tr>
<tr class="separator:a7e98cc0bbb63d96c8033188ebefeb94e inherit pub_methods_classwheels_1_1i_serial"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a471a0264bf9600dc5b8305e9f409c812 inherit pub_methods_classwheels_1_1i_serial" id="r_a471a0264bf9600dc5b8305e9f409c812"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d2/da4/classwheels_1_1i_serial.html">iSerial</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#a471a0264bf9600dc5b8305e9f409c812">evtRecv</a> (std::function&lt; void(size_t, const char *, <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ac0046f5f91af625697c0474ae5084383">err_code</a>)&gt; fun)</td></tr>
<tr class="separator:a471a0264bf9600dc5b8305e9f409c812 inherit pub_methods_classwheels_1_1i_serial"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-static-methods" name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:afffb89b0a3df438aa72cdcedcafe407a" id="r_afffb89b0a3df438aa72cdcedcafe407a"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#afffb89b0a3df438aa72cdcedcafe407a">updt_param</a> (int fd, int baud, int char_len, <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#a5e585bb076d6a01c8c9cdab92e20c5ac">stop</a> s, <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ab1661c3535b0ca7149121b8b00dddca0">parity</a> p, <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#a86e499ffc36867fed86449541837b295">flow</a> f)</td></tr>
<tr class="memdesc:afffb89b0a3df438aa72cdcedcafe407a"><td class="mdescLeft">&#160;</td><td class="mdescRight">更新串口参数，这个函数主要的目的是方便RFC2217.  <br /></td></tr>
<tr class="separator:afffb89b0a3df438aa72cdcedcafe407a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a20f30b673b005485c2fb766e1121769b" id="r_a20f30b673b005485c2fb766e1121769b"><td class="memItemLeft" align="right" valign="top">static std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a20f30b673b005485c2fb766e1121769b">errMsg</a> (<a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ac0046f5f91af625697c0474ae5084383">emErrCode</a> &amp;e)</td></tr>
<tr class="separator:a20f30b673b005485c2fb766e1121769b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_static_methods_classwheels_1_1i_serial"><td colspan="2" onclick="javascript:dynsection.toggleInherit('pub_static_methods_classwheels_1_1i_serial')"><img src="../../closed.png" alt="-"/>&#160;静态 Public 成员函数 继承自 <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html">wheels::iSerial</a></td></tr>
<tr class="memitem:aa4da33b7874fb53fbb8197f6d2c85c9d inherit pub_static_methods_classwheels_1_1i_serial" id="r_aa4da33b7874fb53fbb8197f6d2c85c9d"><td class="memItemLeft" align="right" valign="top">static std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#aa4da33b7874fb53fbb8197f6d2c85c9d">errMsg</a> (<a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ac0046f5f91af625697c0474ae5084383">emErrCode</a> &amp;e)</td></tr>
<tr class="separator:aa4da33b7874fb53fbb8197f6d2c85c9d inherit pub_static_methods_classwheels_1_1i_serial"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pro-methods" name="pro-methods"></a>
Protected 成员函数</h2></td></tr>
<tr class="memitem:a9da03329fe9559fc6e7c12450edf0581" id="r_a9da03329fe9559fc6e7c12450edf0581"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a9da03329fe9559fc6e7c12450edf0581">init_device</a> (int fd, int baud, int char_len, <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#a5e585bb076d6a01c8c9cdab92e20c5ac">stop</a> s, <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ab1661c3535b0ca7149121b8b00dddca0">parity</a> p, <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#a86e499ffc36867fed86449541837b295">flow</a> f)</td></tr>
<tr class="memdesc:a9da03329fe9559fc6e7c12450edf0581"><td class="mdescLeft">&#160;</td><td class="mdescRight">初始化设备参数，试着波特率这些内容  <br /></td></tr>
<tr class="separator:a9da03329fe9559fc6e7c12450edf0581"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6c72f97ce56567a4106d6133deed72fc" id="r_a6c72f97ce56567a4106d6133deed72fc"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a6c72f97ce56567a4106d6133deed72fc">__is_ready</a> ()</td></tr>
<tr class="memdesc:a6c72f97ce56567a4106d6133deed72fc"><td class="mdescLeft">&#160;</td><td class="mdescRight">调用SELECT函数检查是否数据准备好  <br /></td></tr>
<tr class="separator:a6c72f97ce56567a4106d6133deed72fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="inherited" name="inherited"></a>
额外继承的成员函数</h2></td></tr>
<tr class="inherit_header pub_types_classwheels_1_1i_serial"><td colspan="2" onclick="javascript:dynsection.toggleInherit('pub_types_classwheels_1_1i_serial')"><img src="../../closed.png" alt="-"/>&#160;Public 类型 继承自 <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html">wheels::iSerial</a></td></tr>
<tr class="memitem:a5e585bb076d6a01c8c9cdab92e20c5ac inherit pub_types_classwheels_1_1i_serial" id="r_a5e585bb076d6a01c8c9cdab92e20c5ac"><td class="memItemLeft" align="right" valign="top">enum class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#a5e585bb076d6a01c8c9cdab92e20c5ac">stop</a> { <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#a5e585bb076d6a01c8c9cdab92e20c5acab50339a10e1de285ac99d4c3990b8693">NONE</a> = 0
, <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#a5e585bb076d6a01c8c9cdab92e20c5acabc21e6484530fc9d0313cb816b733396">ONE</a>
, <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#a5e585bb076d6a01c8c9cdab92e20c5aca75872ef0066c09a9f7741c8d0c0b8b34">ONE_P_FIVE</a>
, <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#a5e585bb076d6a01c8c9cdab92e20c5aca0f82d86afa0f5dc965c5c15aca58dcfb">TWO</a>
 }</td></tr>
<tr class="separator:a5e585bb076d6a01c8c9cdab92e20c5ac inherit pub_types_classwheels_1_1i_serial"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab1661c3535b0ca7149121b8b00dddca0 inherit pub_types_classwheels_1_1i_serial" id="r_ab1661c3535b0ca7149121b8b00dddca0"><td class="memItemLeft" align="right" valign="top">enum class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ab1661c3535b0ca7149121b8b00dddca0">parity</a> { <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ab1661c3535b0ca7149121b8b00dddca0ab50339a10e1de285ac99d4c3990b8693">NONE</a> = 0
, <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ab1661c3535b0ca7149121b8b00dddca0a6634c67f28ba9a80efe941b9519aa106">EVEN</a> = 1
, <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ab1661c3535b0ca7149121b8b00dddca0a57a1355d5527355458c7cc08ba70bf94">ODD</a> = 2
 }</td></tr>
<tr class="separator:ab1661c3535b0ca7149121b8b00dddca0 inherit pub_types_classwheels_1_1i_serial"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a86e499ffc36867fed86449541837b295 inherit pub_types_classwheels_1_1i_serial" id="r_a86e499ffc36867fed86449541837b295"><td class="memItemLeft" align="right" valign="top">enum class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#a86e499ffc36867fed86449541837b295">flow</a> { <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#a86e499ffc36867fed86449541837b295ab50339a10e1de285ac99d4c3990b8693">NONE</a> = 0
, <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#a86e499ffc36867fed86449541837b295a7c144eae2e08db14c82e376603cc01f4">HARD</a>
, <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#a86e499ffc36867fed86449541837b295a52e743143106c12bfd73aae547fc6e2e">SOFT</a>
, <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#a86e499ffc36867fed86449541837b295a7db074166dc89fa0ffaf4d29fba1212c">KEEPBACK</a>
 }</td></tr>
<tr class="separator:a86e499ffc36867fed86449541837b295 inherit pub_types_classwheels_1_1i_serial"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac0046f5f91af625697c0474ae5084383 inherit pub_types_classwheels_1_1i_serial" id="r_ac0046f5f91af625697c0474ae5084383"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ac0046f5f91af625697c0474ae5084383">err_code</a> { <br />
&#160;&#160;<a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ac0046f5f91af625697c0474ae5084383a6551c9ad625eaf9a74ae075a5f8b9536">ERR_BASE</a> = -1000
, <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ac0046f5f91af625697c0474ae5084383a89c845b1e9e073009724c86a746257ba">ERR_ALLOC_MEM</a>
, <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ac0046f5f91af625697c0474ae5084383a7ed7d6d446b6c86f35c552d8592dc366">ERR_DEV_OCCUPIED</a>
, <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ac0046f5f91af625697c0474ae5084383a1edc81c7de7df53ea7b1613c1edb38b3">ERR_DEV_NOT_EXIST</a>
, <br />
&#160;&#160;<a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ac0046f5f91af625697c0474ae5084383a5b719da2246330ac1f47883d0d9a5804">ERR_SEND_DATA_EMPTY</a>
, <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ac0046f5f91af625697c0474ae5084383a3461eab809f4ff664d8595a5a6907ca5">ERR_SET_PARAMS</a>
, <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ac0046f5f91af625697c0474ae5084383ae630c3d7fc79ba79a0ee07e992da58af">ERR_BAD_DEV</a>
, <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ac0046f5f91af625697c0474ae5084383abc38228971e6cde947aa8fed6ae6ad3c">ERR_BAD_FD</a>
, <br />
&#160;&#160;<a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ac0046f5f91af625697c0474ae5084383a73d5b6774d0bf478479eebd498446063">ERR_OPEN_SERIAL</a>
, <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ac0046f5f91af625697c0474ae5084383af9792569271aaf414353459cbe823420">ERR_CLOSE_UART</a>
, <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ac0046f5f91af625697c0474ae5084383a3f84716229ae01aa63b9738ba850d89d">ERR_SEND_FAIL</a>
, <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ac0046f5f91af625697c0474ae5084383a6ebdbb240bf52714bdc9681c02caf4ee">ERR_READ_DATA</a>
, <br />
&#160;&#160;<a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ac0046f5f91af625697c0474ae5084383acaa284f06babae6bf2ffd909a488ee6c">ERR_ALREADY_OPENED</a>
, <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ac0046f5f91af625697c0474ae5084383a8b22b30b92d939b9fb6afbc86df700f1">SET_COM_FAIL</a>
, <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ac0046f5f91af625697c0474ae5084383a71bb25e207215655764ee833d235290b">ERR_DATA_NULL</a>
, <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ac0046f5f91af625697c0474ae5084383a429f092781c607ee7830322ab6622103">GET_COM_FAIL</a>
, <br />
&#160;&#160;<a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ac0046f5f91af625697c0474ae5084383a3ce50c3c0054820b2d594df51710ecac">ERR_STOP_READ_THD</a>
, <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ac0046f5f91af625697c0474ae5084383a29cdf0170835f2c3c026fea1addf09fd">ERR_OVT</a>
, <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ac0046f5f91af625697c0474ae5084383ad3e1514c8be3361f16cb220d06ffbf2e">ERR_ASYNC_WAIT_FAIL</a>
, <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ac0046f5f91af625697c0474ae5084383aeccd7b350937d5cae8fe41908f29e33b">ERR_ASYNC_GET_RST_FAIL</a>
, <br />
&#160;&#160;<a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ac0046f5f91af625697c0474ae5084383ac916edd76e76d336d3d95ccfa839ca8a">OK</a> = 0
<br />
 }</td></tr>
<tr class="separator:ac0046f5f91af625697c0474ae5084383 inherit pub_types_classwheels_1_1i_serial"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afc49daaccbcc21e386b3fac67a479fcc inherit pub_types_classwheels_1_1i_serial" id="r_afc49daaccbcc21e386b3fac67a479fcc"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#afc49daaccbcc21e386b3fac67a479fcc">emErrCode</a> = <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ac0046f5f91af625697c0474ae5084383">err_code</a></td></tr>
<tr class="separator:afc49daaccbcc21e386b3fac67a479fcc inherit pub_types_classwheels_1_1i_serial"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock">
<p class="definition">在文件 <a class="el" href="../../d2/dd8/linux_serial_8hpp_source.html">linuxSerial.hpp</a> 第 <a class="el" href="../../d2/dd8/linux_serial_8hpp_source.html#l00023">23</a> 行定义.</p>
</div><h2 class="groupheader">构造及析构函数说明</h2>
<a id="a697fb4aa40e1b97ce273cdc56e3fdf3f" name="a697fb4aa40e1b97ce273cdc56e3fdf3f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a697fb4aa40e1b97ce273cdc56e3fdf3f">&#9670;&#160;</a></span>linuxSerial() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">linuxSerial::linuxSerial </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;</td>          <td class="paramname"><span class="paramname"><em>name</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>创建对象，设置窗口名称和接收到数据的时候回调响应 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>异常</dt><dd>
  <table class="exception">
    <tr><td class="paramname">如果缓冲区内存分配失败，会抛出ERR_ALLOC_MEM</td><td></td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="../../d9/db7/linux_serial_8cpp_source.html">linuxSerial.cpp</a> 第 <a class="el" href="../../d9/db7/linux_serial_8cpp_source.html#l00021">21</a> 行定义.</p>

</div>
</div>
<a id="a688f4db1d912419750eb067980190858" name="a688f4db1d912419750eb067980190858"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a688f4db1d912419750eb067980190858">&#9670;&#160;</a></span>linuxSerial() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">linuxSerial::linuxSerial </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;</td>          <td class="paramname"><span class="paramname"><em>name</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int</td>          <td class="paramname"><span class="paramname"><em>baud</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int</td>          <td class="paramname"><span class="paramname"><em>char_len</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#a5e585bb076d6a01c8c9cdab92e20c5ac">stop</a></td>          <td class="paramname"><span class="paramname"><em>s</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ab1661c3535b0ca7149121b8b00dddca0">parity</a></td>          <td class="paramname"><span class="paramname"><em>p</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#a86e499ffc36867fed86449541837b295">flow</a></td>          <td class="paramname"><span class="paramname"><em>f</em></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>创建并打开串口 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">baud</td><td>波特率 </td></tr>
    <tr><td class="paramname">char_len</td><td>字长 </td></tr>
    <tr><td class="paramname">s</td><td>停止位 </td></tr>
    <tr><td class="paramname">p</td><td>校验位 </td></tr>
    <tr><td class="paramname">f</td><td>流控参数 </td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>异常</dt><dd>
  <table class="exception">
    <tr><td class="paramname">如果缓冲区内存分配失败，会抛出ERR_ALLOC_MEM</td><td></td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="../../d9/db7/linux_serial_8cpp_source.html">linuxSerial.cpp</a> 第 <a class="el" href="../../d9/db7/linux_serial_8cpp_source.html#l00027">27</a> 行定义.</p>
<div class="dynheader">
函数调用图:</div>
<div class="dyncontent">
<div class="center"><img src="../../de/d23/classwheels_1_1linux_serial_a688f4db1d912419750eb067980190858_cgraph.png" border="0" usemap="#ade/d23/classwheels_1_1linux_serial_a688f4db1d912419750eb067980190858_cgraph" alt=""/></div>
<map name="ade/d23/classwheels_1_1linux_serial_a688f4db1d912419750eb067980190858_cgraph" id="ade/d23/classwheels_1_1linux_serial_a688f4db1d912419750eb067980190858_cgraph">
<area shape="rect" title="创建并打开串口" alt="" coords="5,35,136,77"/>
<area shape="rect" href="../../de/d23/classwheels_1_1linux_serial.html#ae1eda65d5555203a3c5efbdf7c025b57" title="打开串口。" alt="" coords="184,5,314,48"/>
<area shape="poly" title=" " alt="" coords="136,43,168,37,169,43,137,48"/>
<area shape="rect" href="../../d3/d47/classwheels_1_1debug.html#a5fa52d8a6d24d2f6686055e7cefa04b6" title=" " alt="" coords="362,43,555,69"/>
<area shape="poly" title=" " alt="" coords="136,56,184,57,314,57,346,57,346,62,314,63,184,63,136,61"/>
<area shape="poly" title=" " alt="" coords="315,33,347,38,346,43,314,38"/>
</map>
</div>

</div>
</div>
<a id="aaa6af0628c178e3e93f502c048a1dafb" name="aaa6af0628c178e3e93f502c048a1dafb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaa6af0628c178e3e93f502c048a1dafb">&#9670;&#160;</a></span>~linuxSerial()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">linuxSerial::~linuxSerial </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../d9/db7/linux_serial_8cpp_source.html">linuxSerial.cpp</a> 第 <a class="el" href="../../d9/db7/linux_serial_8cpp_source.html#l00052">52</a> 行定义.</p>

</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a id="a6c72f97ce56567a4106d6133deed72fc" name="a6c72f97ce56567a4106d6133deed72fc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6c72f97ce56567a4106d6133deed72fc">&#9670;&#160;</a></span>__is_ready()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool linuxSerial::__is_ready </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>调用SELECT函数检查是否数据准备好 </p>

<p class="definition">在文件 <a class="el" href="../../d9/db7/linux_serial_8cpp_source.html">linuxSerial.cpp</a> 第 <a class="el" href="../../d9/db7/linux_serial_8cpp_source.html#l00249">249</a> 行定义.</p>

</div>
</div>
<a id="ae7aa105c917d919cda8239f2bc0b064c" name="ae7aa105c917d919cda8239f2bc0b064c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae7aa105c917d919cda8239f2bc0b064c">&#9670;&#160;</a></span>close()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ac0046f5f91af625697c0474ae5084383">linuxSerial::err_code</a> linuxSerial::close </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">final</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>实现了 <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ad87bdf24e0f27d6285410e4d133c9ab1">wheels::iSerial</a>.</p>

<p class="definition">在文件 <a class="el" href="../../d9/db7/linux_serial_8cpp_source.html">linuxSerial.cpp</a> 第 <a class="el" href="../../d9/db7/linux_serial_8cpp_source.html#l00221">221</a> 行定义.</p>
<div class="dynheader">
函数调用图:</div>
<div class="dyncontent">
<div class="center"><img src="../../de/d23/classwheels_1_1linux_serial_ae7aa105c917d919cda8239f2bc0b064c_cgraph.png" border="0" usemap="#ade/d23/classwheels_1_1linux_serial_ae7aa105c917d919cda8239f2bc0b064c_cgraph" alt=""/></div>
<map name="ade/d23/classwheels_1_1linux_serial_ae7aa105c917d919cda8239f2bc0b064c_cgraph" id="ade/d23/classwheels_1_1linux_serial_ae7aa105c917d919cda8239f2bc0b064c_cgraph">
<area shape="rect" title=" " alt="" coords="5,29,136,72"/>
<area shape="poly" title=" " alt="" coords="45,29,44,20,48,11,57,5,71,3,85,5,94,12,91,16,83,10,70,8,59,10,52,14,49,20,50,28"/>
</map>
</div>
<div class="dynheader">
这是这个函数的调用关系图:</div>
<div class="dyncontent">
<div class="center"><img src="../../de/d23/classwheels_1_1linux_serial_ae7aa105c917d919cda8239f2bc0b064c_icgraph.png" border="0" usemap="#ade/d23/classwheels_1_1linux_serial_ae7aa105c917d919cda8239f2bc0b064c_icgraph" alt=""/></div>
<map name="ade/d23/classwheels_1_1linux_serial_ae7aa105c917d919cda8239f2bc0b064c_icgraph" id="ade/d23/classwheels_1_1linux_serial_ae7aa105c917d919cda8239f2bc0b064c_icgraph">
<area shape="rect" title=" " alt="" coords="5,29,136,72"/>
<area shape="poly" title=" " alt="" coords="91,16,83,10,70,8,59,10,52,14,49,20,50,28,45,29,44,20,48,11,57,5,71,3,85,5,94,12"/>
</map>
</div>

</div>
</div>
<a id="a20f30b673b005485c2fb766e1121769b" name="a20f30b673b005485c2fb766e1121769b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a20f30b673b005485c2fb766e1121769b">&#9670;&#160;</a></span>errMsg()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static std::string wheels::linuxSerial::errMsg </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ac0046f5f91af625697c0474ae5084383">emErrCode</a> &amp;</td>          <td class="paramname"><span class="paramname"><em>e</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="aaec1476e75dc8e7f9639bd4fa93ec34c" name="aaec1476e75dc8e7f9639bd4fa93ec34c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaec1476e75dc8e7f9639bd4fa93ec34c">&#9670;&#160;</a></span>evtClose()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html">iSerial</a> &amp; wheels::linuxSerial::evtClose </td>
          <td>(</td>
          <td class="paramtype">std::function&lt; void(<a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ac0046f5f91af625697c0474ae5084383">err_code</a>)&gt;</td>          <td class="paramname"><span class="paramname"><em>fun</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">final</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../d2/dd8/linux_serial_8hpp_source.html">linuxSerial.hpp</a> 第 <a class="el" href="../../d2/dd8/linux_serial_8hpp_source.html#l00124">124</a> 行定义.</p>

</div>
</div>
<a id="ae21be7510349d6d422b101cdc7c6f536" name="ae21be7510349d6d422b101cdc7c6f536"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae21be7510349d6d422b101cdc7c6f536">&#9670;&#160;</a></span>evtOpen()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html">iSerial</a> &amp; wheels::linuxSerial::evtOpen </td>
          <td>(</td>
          <td class="paramtype">std::function&lt; void(<a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ac0046f5f91af625697c0474ae5084383">err_code</a>)&gt;</td>          <td class="paramname"><span class="paramname"><em>fun</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">final</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>操作事件设置操作事件 </p>

<p>实现了 <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#a3b795a5175156cdb27960db3b6ead564">wheels::iSerial</a>.</p>

<p class="definition">在文件 <a class="el" href="../../d2/dd8/linux_serial_8hpp_source.html">linuxSerial.hpp</a> 第 <a class="el" href="../../d2/dd8/linux_serial_8hpp_source.html#l00119">119</a> 行定义.</p>

</div>
</div>
<a id="a7ec905c105f06ff8fb4732e0780d3c36" name="a7ec905c105f06ff8fb4732e0780d3c36"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7ec905c105f06ff8fb4732e0780d3c36">&#9670;&#160;</a></span>evtRecv()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html">iSerial</a> &amp; wheels::linuxSerial::evtRecv </td>
          <td>(</td>
          <td class="paramtype">std::function&lt; void(size_t, const char *, <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ac0046f5f91af625697c0474ae5084383">err_code</a>)&gt;</td>          <td class="paramname"><span class="paramname"><em>fun</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">final</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../d2/dd8/linux_serial_8hpp_source.html">linuxSerial.hpp</a> 第 <a class="el" href="../../d2/dd8/linux_serial_8hpp_source.html#l00132">132</a> 行定义.</p>

</div>
</div>
<a id="a2de566243fef6baac4e160366fa1cb6a" name="a2de566243fef6baac4e160366fa1cb6a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2de566243fef6baac4e160366fa1cb6a">&#9670;&#160;</a></span>evtSend()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html">iSerial</a> &amp; wheels::linuxSerial::evtSend </td>
          <td>(</td>
          <td class="paramtype">std::function&lt; void(size_t, <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ac0046f5f91af625697c0474ae5084383">err_code</a>)&gt;</td>          <td class="paramname"><span class="paramname"><em>fun</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">final</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../d2/dd8/linux_serial_8hpp_source.html">linuxSerial.hpp</a> 第 <a class="el" href="../../d2/dd8/linux_serial_8hpp_source.html#l00128">128</a> 行定义.</p>

</div>
</div>
<a id="a9da03329fe9559fc6e7c12450edf0581" name="a9da03329fe9559fc6e7c12450edf0581"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9da03329fe9559fc6e7c12450edf0581">&#9670;&#160;</a></span>init_device()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void linuxSerial::init_device </td>
          <td>(</td>
          <td class="paramtype">int</td>          <td class="paramname"><span class="paramname"><em>fd</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int</td>          <td class="paramname"><span class="paramname"><em>baud</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int</td>          <td class="paramname"><span class="paramname"><em>char_len</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#a5e585bb076d6a01c8c9cdab92e20c5ac">stop</a></td>          <td class="paramname"><span class="paramname"><em>s</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ab1661c3535b0ca7149121b8b00dddca0">parity</a></td>          <td class="paramname"><span class="paramname"><em>p</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#a86e499ffc36867fed86449541837b295">flow</a></td>          <td class="paramname"><span class="paramname"><em>f</em></span>&#160;)</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>初始化设备参数，试着波特率这些内容 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">fd,注意这个fd是linux下的文件描述符</td><td></td></tr>
    <tr><td class="paramname">baud</td><td></td></tr>
    <tr><td class="paramname">char_len</td><td></td></tr>
    <tr><td class="paramname">s</td><td></td></tr>
    <tr><td class="paramname">p</td><td></td></tr>
    <tr><td class="paramname">f</td><td></td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="../../d9/db7/linux_serial_8cpp_source.html">linuxSerial.cpp</a> 第 <a class="el" href="../../d9/db7/linux_serial_8cpp_source.html#l00171">171</a> 行定义.</p>

</div>
</div>
<a id="a41192c3d698e15dbd0e9c11427969774" name="a41192c3d698e15dbd0e9c11427969774"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a41192c3d698e15dbd0e9c11427969774">&#9670;&#160;</a></span>is_open()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool wheels::linuxSerial::is_open </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">final</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>串口是否打开 </p>
<dl class="section return"><dt>返回</dt><dd>打开返回true , 否则返回false </dd></dl>

<p>实现了 <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#a7e4804af8e9971965685ccbb4500f9fc">wheels::iSerial</a>.</p>

<p class="definition">在文件 <a class="el" href="../../d2/dd8/linux_serial_8hpp_source.html">linuxSerial.hpp</a> 第 <a class="el" href="../../d2/dd8/linux_serial_8hpp_source.html#l00142">142</a> 行定义.</p>

</div>
</div>
<a id="ae409a2a29670472702e795ffb5048a5a" name="ae409a2a29670472702e795ffb5048a5a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae409a2a29670472702e795ffb5048a5a">&#9670;&#160;</a></span>native_handle()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual native_handle_t wheels::linuxSerial::native_handle </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">final</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>读取系统 </p>

<p>实现了 <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#a568297e82df18819a5b263132437d970">wheels::iSerial</a>.</p>

<p class="definition">在文件 <a class="el" href="../../d2/dd8/linux_serial_8hpp_source.html">linuxSerial.hpp</a> 第 <a class="el" href="../../d2/dd8/linux_serial_8hpp_source.html#l00152">152</a> 行定义.</p>

</div>
</div>
<a id="a9094b478b3581e0b04a163650ad2835d" name="a9094b478b3581e0b04a163650ad2835d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9094b478b3581e0b04a163650ad2835d">&#9670;&#160;</a></span>nativeHandle()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int wheels::linuxSerial::nativeHandle </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../d2/dd8/linux_serial_8hpp_source.html">linuxSerial.hpp</a> 第 <a class="el" href="../../d2/dd8/linux_serial_8hpp_source.html#l00097">97</a> 行定义.</p>

</div>
</div>
<a id="aa1a7af1da37554706069e1f83e48d50d" name="aa1a7af1da37554706069e1f83e48d50d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa1a7af1da37554706069e1f83e48d50d">&#9670;&#160;</a></span>OnClose()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void linuxSerial::OnClose </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ac0046f5f91af625697c0474ae5084383">err_code</a></td>          <td class="paramname"><span class="paramname"><em>e</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>响应串口关闭 </p>

<p class="definition">在文件 <a class="el" href="../../d9/db7/linux_serial_8cpp_source.html">linuxSerial.cpp</a> 第 <a class="el" href="../../d9/db7/linux_serial_8cpp_source.html#l00201">201</a> 行定义.</p>

</div>
</div>
<a id="a916cf4b6b9e105f9272ea0d7abbe4cef" name="a916cf4b6b9e105f9272ea0d7abbe4cef"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a916cf4b6b9e105f9272ea0d7abbe4cef">&#9670;&#160;</a></span>OnOpen()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void linuxSerial::OnOpen </td>
          <td>(</td>
          <td class="paramtype">int</td>          <td class="paramname"><span class="paramname"><em>fd</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>响应libuv 打开文件操作 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">fd,uv_file句柄</td><td></td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="../../d9/db7/linux_serial_8cpp_source.html">linuxSerial.cpp</a> 第 <a class="el" href="../../d9/db7/linux_serial_8cpp_source.html#l00176">176</a> 行定义.</p>

</div>
</div>
<a id="a27cf617098740187e21ce1c169a7e3e6" name="a27cf617098740187e21ce1c169a7e3e6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a27cf617098740187e21ce1c169a7e3e6">&#9670;&#160;</a></span>OnRecv()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void linuxSerial::OnRecv </td>
          <td>(</td>
          <td class="paramtype">const char *</td>          <td class="paramname"><span class="paramname"><em>dat</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t</td>          <td class="paramname"><span class="paramname"><em>len</em></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>响应读取数据完成 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">data[</td><td>I ] </td></tr>
    <tr><td class="paramname">len</td><td></td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="../../d9/db7/linux_serial_8cpp_source.html">linuxSerial.cpp</a> 第 <a class="el" href="../../d9/db7/linux_serial_8cpp_source.html#l00189">189</a> 行定义.</p>
<div class="dynheader">
这是这个函数的调用关系图:</div>
<div class="dyncontent">
<div class="center"><img src="../../de/d23/classwheels_1_1linux_serial_a27cf617098740187e21ce1c169a7e3e6_icgraph.png" border="0" usemap="#ade/d23/classwheels_1_1linux_serial_a27cf617098740187e21ce1c169a7e3e6_icgraph" alt=""/></div>
<map name="ade/d23/classwheels_1_1linux_serial_a27cf617098740187e21ce1c169a7e3e6_icgraph" id="ade/d23/classwheels_1_1linux_serial_a27cf617098740187e21ce1c169a7e3e6_icgraph">
<area shape="rect" title="响应读取数据完成" alt="" coords="210,21,340,64"/>
<area shape="rect" href="../../de/d23/classwheels_1_1linux_serial.html#a474d5ad2e7bb59dc4a6ed1d46a80d056" title="启动串口循环" alt="" coords="5,29,162,56"/>
<area shape="poly" title=" " alt="" coords="194,45,162,45,162,40,194,40"/>
<area shape="poly" title=" " alt="" coords="116,16,105,10,83,8,64,10,53,15,50,20,55,27,51,30,45,21,49,11,62,5,84,3,106,5,119,12"/>
</map>
</div>

</div>
</div>
<a id="a6bb972a9a97bcab75f14753d425f8ebe" name="a6bb972a9a97bcab75f14753d425f8ebe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6bb972a9a97bcab75f14753d425f8ebe">&#9670;&#160;</a></span>OnSend()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void wheels::linuxSerial::OnSend </td>
          <td>(</td>
          <td class="paramtype">size_t</td>          <td class="paramname"><span class="paramname"><em>len</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ac0046f5f91af625697c0474ae5084383">err_code</a></td>          <td class="paramname"><span class="paramname"><em>e</em></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>响应写数据完成 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">len,已经发送的数据长度</td><td></td></tr>
    <tr><td class="paramname">e,操作过程出现的错误代码</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ae1eda65d5555203a3c5efbdf7c025b57" name="ae1eda65d5555203a3c5efbdf7c025b57"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae1eda65d5555203a3c5efbdf7c025b57">&#9670;&#160;</a></span>open()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ac0046f5f91af625697c0474ae5084383">linuxSerial::err_code</a> linuxSerial::open </td>
          <td>(</td>
          <td class="paramtype">int</td>          <td class="paramname"><span class="paramname"><em>baud</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int</td>          <td class="paramname"><span class="paramname"><em>char_len</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#a5e585bb076d6a01c8c9cdab92e20c5ac">stop</a></td>          <td class="paramname"><span class="paramname"><em>s</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ab1661c3535b0ca7149121b8b00dddca0">parity</a></td>          <td class="paramname"><span class="paramname"><em>p</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#a86e499ffc36867fed86449541837b295">flow</a></td>          <td class="paramname"><span class="paramname"><em>f</em></span>&#160;)</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">final</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>打开串口。 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">baud</td><td>波特率 </td></tr>
    <tr><td class="paramname">char_len</td><td>字符长度 </td></tr>
    <tr><td class="paramname">s</td><td>停止位 </td></tr>
    <tr><td class="paramname">p</td><td>校验位 </td></tr>
    <tr><td class="paramname">f</td><td>流控 </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>返回值</dt><dd>
  <table class="retval">
    <tr><td class="paramname">成功返回OK,失败返回错误代码</td><td></td></tr>
  </table>
  </dd>
</dl>

<p>实现了 <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#a5c97a1c2a4ad0302e04f633789742ae4">wheels::iSerial</a>.</p>

<p class="definition">在文件 <a class="el" href="../../d9/db7/linux_serial_8cpp_source.html">linuxSerial.cpp</a> 第 <a class="el" href="../../d9/db7/linux_serial_8cpp_source.html#l00060">60</a> 行定义.</p>
<div class="dynheader">
函数调用图:</div>
<div class="dyncontent">
<div class="center"><img src="../../de/d23/classwheels_1_1linux_serial_ae1eda65d5555203a3c5efbdf7c025b57_cgraph.png" border="0" usemap="#ade/d23/classwheels_1_1linux_serial_ae1eda65d5555203a3c5efbdf7c025b57_cgraph" alt=""/></div>
<map name="ade/d23/classwheels_1_1linux_serial_ae1eda65d5555203a3c5efbdf7c025b57_cgraph" id="ade/d23/classwheels_1_1linux_serial_ae1eda65d5555203a3c5efbdf7c025b57_cgraph">
<area shape="rect" title="打开串口。" alt="" coords="5,5,136,48"/>
<area shape="rect" href="../../d3/d47/classwheels_1_1debug.html#a5fa52d8a6d24d2f6686055e7cefa04b6" title=" " alt="" coords="184,13,377,40"/>
<area shape="poly" title=" " alt="" coords="136,24,168,24,168,29,136,29"/>
</map>
</div>
<div class="dynheader">
这是这个函数的调用关系图:</div>
<div class="dyncontent">
<div class="center"><img src="../../de/d23/classwheels_1_1linux_serial_ae1eda65d5555203a3c5efbdf7c025b57_icgraph.png" border="0" usemap="#ade/d23/classwheels_1_1linux_serial_ae1eda65d5555203a3c5efbdf7c025b57_icgraph" alt=""/></div>
<map name="ade/d23/classwheels_1_1linux_serial_ae1eda65d5555203a3c5efbdf7c025b57_icgraph" id="ade/d23/classwheels_1_1linux_serial_ae1eda65d5555203a3c5efbdf7c025b57_icgraph">
<area shape="rect" title="打开串口。" alt="" coords="184,5,314,48"/>
<area shape="rect" href="../../de/d23/classwheels_1_1linux_serial.html#a688f4db1d912419750eb067980190858" title="创建并打开串口" alt="" coords="5,5,136,48"/>
<area shape="poly" title=" " alt="" coords="168,29,136,29,136,24,168,24"/>
</map>
</div>

</div>
</div>
<a id="a29a53363016957fd31b13ce4afc53215" name="a29a53363016957fd31b13ce4afc53215"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a29a53363016957fd31b13ce4afc53215">&#9670;&#160;</a></span>reset() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ac0046f5f91af625697c0474ae5084383">linuxSerial::err_code</a> linuxSerial::reset </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">final</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>复位串口。关闭串口重新打开 </p>

<p>实现了 <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#a0841ac68972c81b88a01537d92b18984">wheels::iSerial</a>.</p>

<p class="definition">在文件 <a class="el" href="../../d9/db7/linux_serial_8cpp_source.html">linuxSerial.cpp</a> 第 <a class="el" href="../../d9/db7/linux_serial_8cpp_source.html#l00100">100</a> 行定义.</p>

</div>
</div>
<a id="ab7b40c9251d0968ad29e1c35bd2e2022" name="ab7b40c9251d0968ad29e1c35bd2e2022"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab7b40c9251d0968ad29e1c35bd2e2022">&#9670;&#160;</a></span>reset() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ac0046f5f91af625697c0474ae5084383">linuxSerial::err_code</a> linuxSerial::reset </td>
          <td>(</td>
          <td class="paramtype">int</td>          <td class="paramname"><span class="paramname"><em>baud</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int</td>          <td class="paramname"><span class="paramname"><em>char_len</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#a5e585bb076d6a01c8c9cdab92e20c5ac">stop</a></td>          <td class="paramname"><span class="paramname"><em>s</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ab1661c3535b0ca7149121b8b00dddca0">parity</a></td>          <td class="paramname"><span class="paramname"><em>p</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#a86e499ffc36867fed86449541837b295">flow</a></td>          <td class="paramname"><span class="paramname"><em>f</em></span>&#160;)</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">final</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>实现了 <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#af312457e1f3828f86f230cb599b872a5">wheels::iSerial</a>.</p>

<p class="definition">在文件 <a class="el" href="../../d9/db7/linux_serial_8cpp_source.html">linuxSerial.cpp</a> 第 <a class="el" href="../../d9/db7/linux_serial_8cpp_source.html#l00133">133</a> 行定义.</p>

</div>
</div>
<a id="a474d5ad2e7bb59dc4a6ed1d46a80d056" name="a474d5ad2e7bb59dc4a6ed1d46a80d056"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a474d5ad2e7bb59dc4a6ed1d46a80d056">&#9670;&#160;</a></span>run()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void linuxSerial::run </td>
          <td>(</td>
          <td class="paramtype">bool</td>          <td class="paramname"><span class="paramname"><em>run</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">final</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>启动串口循环 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">run[</td><td>I ], true，启动；false停止 </td></tr>
  </table>
  </dd>
</dl>

<p>实现了 <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ab17d3719e9133baba1a3ed852210e143">wheels::iSerial</a>.</p>

<p class="definition">在文件 <a class="el" href="../../d9/db7/linux_serial_8cpp_source.html">linuxSerial.cpp</a> 第 <a class="el" href="../../d9/db7/linux_serial_8cpp_source.html#l00272">272</a> 行定义.</p>
<div class="dynheader">
函数调用图:</div>
<div class="dyncontent">
<div class="center"><img src="../../de/d23/classwheels_1_1linux_serial_a474d5ad2e7bb59dc4a6ed1d46a80d056_cgraph.png" border="0" usemap="#ade/d23/classwheels_1_1linux_serial_a474d5ad2e7bb59dc4a6ed1d46a80d056_cgraph" alt=""/></div>
<map name="ade/d23/classwheels_1_1linux_serial_a474d5ad2e7bb59dc4a6ed1d46a80d056_cgraph" id="ade/d23/classwheels_1_1linux_serial_a474d5ad2e7bb59dc4a6ed1d46a80d056_cgraph">
<area shape="rect" title="启动串口循环" alt="" coords="5,43,162,69"/>
<area shape="poly" title=" " alt="" coords="46,44,39,34,44,24,59,18,84,16,110,19,124,25,122,30,109,24,83,21,60,23,47,28,44,33,50,41"/>
<area shape="rect" href="../../de/d23/classwheels_1_1linux_serial.html#a27cf617098740187e21ce1c169a7e3e6" title="响应读取数据完成" alt="" coords="241,5,372,48"/>
<area shape="poly" title=" " alt="" coords="161,43,226,35,226,40,162,48"/>
<area shape="rect" href="../../d3/d47/classwheels_1_1debug.html#a5fa52d8a6d24d2f6686055e7cefa04b6" title=" " alt="" coords="210,72,403,99"/>
<area shape="poly" title=" " alt="" coords="162,64,195,68,194,73,161,69"/>
</map>
</div>
<div class="dynheader">
这是这个函数的调用关系图:</div>
<div class="dyncontent">
<div class="center"><img src="../../de/d23/classwheels_1_1linux_serial_a474d5ad2e7bb59dc4a6ed1d46a80d056_icgraph.png" border="0" usemap="#ade/d23/classwheels_1_1linux_serial_a474d5ad2e7bb59dc4a6ed1d46a80d056_icgraph" alt=""/></div>
<map name="ade/d23/classwheels_1_1linux_serial_a474d5ad2e7bb59dc4a6ed1d46a80d056_icgraph" id="ade/d23/classwheels_1_1linux_serial_a474d5ad2e7bb59dc4a6ed1d46a80d056_icgraph">
<area shape="rect" title="启动串口循环" alt="" coords="5,29,162,56"/>
<area shape="poly" title=" " alt="" coords="110,16,101,10,83,8,67,10,59,15,57,20,61,28,56,30,52,21,55,11,66,5,84,3,102,5,113,12"/>
</map>
</div>

</div>
</div>
<a id="ae173022d0f2cec8917b6ef9ed6b3ed31" name="ae173022d0f2cec8917b6ef9ed6b3ed31"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae173022d0f2cec8917b6ef9ed6b3ed31">&#9670;&#160;</a></span>send()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ac0046f5f91af625697c0474ae5084383">linuxSerial::err_code</a> linuxSerial::send </td>
          <td>(</td>
          <td class="paramtype">size_t</td>          <td class="paramname"><span class="paramname"><em>len</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *</td>          <td class="paramname"><span class="paramname"><em>data</em></span>&#160;)</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">final</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>发送数据。这个函数调用后立即返回，操作结果从回调中获取，因此这个函数执行返回后 并不一位置发送完成 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">len</td><td>， 要发送的数据长度 </td></tr>
    <tr><td class="paramname">data,要发送的数据</td><td></td></tr>
  </table>
  </dd>
</dl>

<p>实现了 <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#afcb400225050bb4d269ad4e24b9cfd3d">wheels::iSerial</a>.</p>

<p class="definition">在文件 <a class="el" href="../../d9/db7/linux_serial_8cpp_source.html">linuxSerial.cpp</a> 第 <a class="el" href="../../d9/db7/linux_serial_8cpp_source.html#l00209">209</a> 行定义.</p>

</div>
</div>
<a id="a499b01dd1f4f06f675fc3466dd7a0e39" name="a499b01dd1f4f06f675fc3466dd7a0e39"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a499b01dd1f4f06f675fc3466dd7a0e39">&#9670;&#160;</a></span>SetBufferSize()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void linuxSerial::SetBufferSize </td>
          <td>(</td>
          <td class="paramtype">size_t</td>          <td class="paramname"><span class="paramname"><em>l</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>设置缓冲大小 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">l</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>异常</dt><dd>
  <table class="exception">
    <tr><td class="paramname">如果内存分配失败抛出ERR_ALLOC_MEM</td><td></td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="../../d9/db7/linux_serial_8cpp_source.html">linuxSerial.cpp</a> 第 <a class="el" href="../../d9/db7/linux_serial_8cpp_source.html#l00093">93</a> 行定义.</p>

</div>
</div>
<a id="a9394e61eb3763eb72c902a2fef68ddb2" name="a9394e61eb3763eb72c902a2fef68ddb2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9394e61eb3763eb72c902a2fef68ddb2">&#9670;&#160;</a></span>standby()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void linuxSerial::standby </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">final</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>结束串口消息循环 </p>

<p>实现了 <a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#a15753b84ca120807c482260c1ff935b2">wheels::iSerial</a>.</p>

<p class="definition">在文件 <a class="el" href="../../d9/db7/linux_serial_8cpp_source.html">linuxSerial.cpp</a> 第 <a class="el" href="../../d9/db7/linux_serial_8cpp_source.html#l00321">321</a> 行定义.</p>

</div>
</div>
<a id="afffb89b0a3df438aa72cdcedcafe407a" name="afffb89b0a3df438aa72cdcedcafe407a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afffb89b0a3df438aa72cdcedcafe407a">&#9670;&#160;</a></span>updt_param()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool linuxSerial::updt_param </td>
          <td>(</td>
          <td class="paramtype">int</td>          <td class="paramname"><span class="paramname"><em>fd</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int</td>          <td class="paramname"><span class="paramname"><em>baud</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int</td>          <td class="paramname"><span class="paramname"><em>char_len</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#a5e585bb076d6a01c8c9cdab92e20c5ac">stop</a></td>          <td class="paramname"><span class="paramname"><em>s</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#ab1661c3535b0ca7149121b8b00dddca0">parity</a></td>          <td class="paramname"><span class="paramname"><em>p</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d2/da4/classwheels_1_1i_serial.html#a86e499ffc36867fed86449541837b295">flow</a></td>          <td class="paramname"><span class="paramname"><em>f</em></span>&#160;)</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>更新串口参数，这个函数主要的目的是方便RFC2217. </p>

<p class="definition">在文件 <a class="el" href="../../d9/db7/linux_serial_8cpp_source.html">linuxSerial.cpp</a> 第 <a class="el" href="../../d9/db7/linux_serial_8cpp_source.html#l00327">327</a> 行定义.</p>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>include/details/<a class="el" href="../../d2/dd8/linux_serial_8hpp_source.html">linuxSerial.hpp</a></li>
<li>src/details/<a class="el" href="../../d9/db7/linux_serial_8cpp_source.html">linuxSerial.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.11.0
</small></address>
</div><!-- doc-content -->
</body>
</html>
